import { BrowserConsoleAppender, LoggerFactory, LoggerLevel } from '@es-tool/log'

const console = new BrowserConsoleAppender()
// console.config.useTable = false

const factory = new LoggerFactory({
    appender: {
        'console': console,
    },
    root: {
        level: LoggerLevel.ALL,
        appender: 'console',
    },
    config: [
        { name: '测试日志', level: LoggerLevel.ALL },
    ],
})

const log = factory.getLogger('测试日志')
log.trace('啊哈')
log.debug('啊哈')
log.debug(console)
log.info('啊哈')
log.warn('啊哈')
log.error('啊哈')
